﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Management.Automation.Host;
using System.Threading;
using System.Globalization;

namespace Evaluant.PS4VS.Renderer
{
    public class VSHost : PSHost
    {
        public VSHost()
        {
            currentCulture = Thread.CurrentThread.CurrentCulture;
            currentUICulture = Thread.CurrentThread.CurrentUICulture;
        }

        CultureInfo currentCulture;
        CultureInfo currentUICulture;
        PSHostUserInterface vsHostUI;

        public override System.Globalization.CultureInfo CurrentCulture
        {
            get { return currentCulture; }
        }

        public override System.Globalization.CultureInfo CurrentUICulture
        {
            get { return currentUICulture; }
        }

        public override void EnterNestedPrompt()
        {
        }

        public override void ExitNestedPrompt()
        {
        }

        public override Guid InstanceId
        {
            get { return GetType().GUID; }
        }

        public override string Name
        {
            get { return "VSHost"; }
        }

        public override void NotifyBeginApplication()
        {
        }

        public override void NotifyEndApplication()
        {
        }

        public override void SetShouldExit(int exitCode)
        {
        }

        public override PSHostUserInterface UI
        {
            get { return vsHostUI; }
        }

        public void SetUI(PSHostUserInterface ui)
        {
            vsHostUI = ui;
        }

        public override Version Version
        {
            get { return GetType().Assembly.GetName().Version; }
        }
    }
}
